package com.xinchen.aiounlimit.model.repository

import com.maple.base.model.BaseRepository
import com.maple.model.resp.BaseResp
import com.xinchen.aiounlimit.model.RetrofitClient
import com.maple.utils.util.HttpRequestUtils
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import java.util.*

class CommonRepository : BaseRepository() {

    private val retrofitClient = RetrofitClient.service

    override fun getPublicParams(): WeakHashMap<String, Any> {
        return HttpRequestUtils.requestParams()
    }



    suspend fun login(params: WeakHashMap<String, Any>) = withContext(Dispatchers.IO) {
        retrofitClient.login(params2Encrypt(params))
    }
}